
/*
 * 数据结果
 *
 */

#ifndef __SUM_H__
#define __SUM_H__


#include <map>
#include <ostream>
#include <string>

#include "common.h"
#include "position.h"


using namespace std;

class DataSum
{
public:
	DataSum(const Position &pos, const CALC_TYPE  ct);
	~DataSum(void);

	void add(const string &key, const int index, const long value);	
	const int GetMaxKeyLength() const;
	const map<string, result_t*>&  GetData(void) const;
	const CALC_TYPE  GetCalcType(void) const;
private:
	DataSum();
	DataSum(const DataSum &ds);
	DataSum& operator=(const DataSum &ds);

private:
	map<string, result_t*>	m_mapKeySum;
	Position		m_mapPosition;
	CALC_TYPE		m_eCalcType;
	int			m_nMaxKeyLength;
};


#endif
